// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "StSocketTool.generated.h"


/**
 * 
 */
UCLASS()
class GAMEOFLIFE_API UStSocketTool : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
public:
	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static bool GetIpInt(int index, int& a, int& b, int& c, int& d, FString& pcName);

	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static bool GetIpString(int index, FString& ip, FString& pcName);


	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static bool GetIPFromDns(FString dns_, FString& outip);

	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static bool IsIPv4(FString ip);


	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static FString GetBasePath();

	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static FString GetBasePathWin();

	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static bool ReadTxtData(FString path, FString& data);

	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static bool WriteTxtDataToDisk(FString path, FString data);

	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static FString GetTimeString();

	UFUNCTION(BlueprintCallable, Category = "StSocketTool")
		static bool IsHot(int hot) 
	{
		return hot > 80 && hot <= 65535;
	}
};
